Optimal. Leaf size=114 \[ \frac {6 i c^4}{f \left (a^3+i a^3 \tan (e+f x)\right )}-\frac {i c^4 \log (\cos (e+f x))}{a^3 f}-\frac {c^4 x}{a^3}-\frac {6 i c^4}{a f (a+i a \tan (e+f x))^2}+\frac {8 i c^4}{3 f (a+i a \tan (e+f x))^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3522, 3487, 43} \[ \frac {6 i c^4}{f \left (a^3+i a^3 \tan (e+f x)\right )}-\frac {i c^4 \log (\cos (e+f x))}{a^3 f}-\frac {c^4 x}{a^3}-\frac {6 i c^4}{a f (a+i a \tan (e+f x))^2}+\frac {8 i c^4}{3 f (a+i a \tan (e+f x))^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 3487
Rule 3522
Rubi steps
\begin {align*} \int \frac {(c-i c \tan (e+f x))^4}{(a+i a \tan (e+f x))^3} \, dx &=\left (a^4 c^4\right ) \int \frac {\sec ^8(e+f x)}{(a+i a \tan (e+f x))^7} \, dx\\ &=-\frac {\left (i c^4\right ) \operatorname {Subst}\left (\int \frac {(a-x)^3}{(a+x)^4} \, dx,x,i a \tan (e+f x)\right )}{a^3 f}\\ &=-\frac {\left (i c^4\right ) \operatorname {Subst}\left (\int \left (\frac {1}{-a-x}+\frac {8 a^3}{(a+x)^4}-\frac {12 a^2}{(a+x)^3}+\frac {6 a}{(a+x)^2}\right ) \, dx,x,i a \tan (e+f x)\right )}{a^3 f}\\ &=-\frac {c^4 x}{a^3}-\frac {i c^4 \log (\cos (e+f x))}{a^3 f}+\frac {8 i c^4}{3 f (a+i a \tan (e+f x))^3}-\frac {6 i c^4}{a f (a+i a \tan (e+f x))^2}+\frac {6 i c^4}{f \left (a^3+i a^3 \tan (e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.76, size = 121, normalized size = 1.06 \[ \frac {c^4 \sec ^3(e+f x) (-9 i \sin (e+f x)+6 f x \sin (3 (e+f x))+2 i \sin (3 (e+f x))-3 \cos (e+f x)+\cos (3 (e+f x)) (6 \log (\cos (e+f x))-6 i f x-2)+6 i \sin (3 (e+f x)) \log (\cos (e+f x)))}{6 a^3 f (\tan (e+f x)-i)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 93, normalized size = 0.82 \[ -\frac {{\left (12 \, c^{4} f x e^{\left (6 i \, f x + 6 i \, e\right )} + 6 i \, c^{4} e^{\left (6 i \, f x + 6 i \, e\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right ) - 6 i \, c^{4} e^{\left (4 i \, f x + 4 i \, e\right )} + 3 i \, c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} - 2 i \, c^{4}\right )} e^{\left (-6 i \, f x - 6 i \, e\right )}}{6 \, a^{3} f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 2.40, size = 193, normalized size = 1.69 \[ -\frac {\frac {30 i \, c^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{a^{3}} - \frac {60 i \, c^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}{a^{3}} + \frac {30 i \, c^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{a^{3}} + \frac {147 i \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 1002 \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 2445 i \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 3820 \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 2445 i \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1002 \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 147 i \, c^{4}}{a^{3} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}^{6}}}{30 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.21, size = 91, normalized size = 0.80 \[ \frac {6 c^{4}}{f \,a^{3} \left (\tan \left (f x +e \right )-i\right )}+\frac {6 i c^{4}}{f \,a^{3} \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {i c^{4} \ln \left (\tan \left (f x +e \right )-i\right )}{f \,a^{3}}-\frac {8 c^{4}}{3 f \,a^{3} \left (\tan \left (f x +e \right )-i\right )^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.77, size = 103, normalized size = 0.90 \[ -\frac {\frac {6\,c^4\,\mathrm {tan}\left (e+f\,x\right )}{a^3}-\frac {c^4\,8{}\mathrm {i}}{3\,a^3}+\frac {c^4\,{\mathrm {tan}\left (e+f\,x\right )}^2\,6{}\mathrm {i}}{a^3}}{f\,\left (-{\mathrm {tan}\left (e+f\,x\right )}^3\,1{}\mathrm {i}-3\,{\mathrm {tan}\left (e+f\,x\right )}^2+\mathrm {tan}\left (e+f\,x\right )\,3{}\mathrm {i}+1\right )}+\frac {c^4\,\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,1{}\mathrm {i}}{a^3\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.65, size = 216, normalized size = 1.89 \[ \begin {cases} - \frac {\left (- 6 i a^{6} c^{4} f^{2} e^{10 i e} e^{- 2 i f x} + 3 i a^{6} c^{4} f^{2} e^{8 i e} e^{- 4 i f x} - 2 i a^{6} c^{4} f^{2} e^{6 i e} e^{- 6 i f x}\right ) e^{- 12 i e}}{6 a^{9} f^{3}} & \text {for}\: 6 a^{9} f^{3} e^{12 i e} \neq 0 \\x \left (\frac {2 c^{4}}{a^{3}} + \frac {\left (- 2 c^{4} e^{6 i e} + 2 c^{4} e^{4 i e} - 2 c^{4} e^{2 i e} + 2 c^{4}\right ) e^{- 6 i e}}{a^{3}}\right ) & \text {otherwise} \end {cases} - \frac {2 c^{4} x}{a^{3}} - \frac {i c^{4} \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{a^{3} f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________